import request from './request'
// 获取轮播图数据
export function getBannerlist () {
  return request({
    url: '/banner',
    method: 'get'
  })
}

// 获取精品数据
export function getpolist (params) {
  return request({
    url: '/top/playlist/highquality',
    method: 'get',
    params
  })
}
// 获取大家都在听
export function getlist (params) {
  const data = params || { limit: 5 }
  return request({
    url: '/personalized/newsong',
    method: 'get',
    data
  })
}
// 获取歌曲地址
export function getMusicUrl (params) {
  return request({
    url: '/song/url',
    method: 'get',
    params
  })
}
// 推荐歌单
export function getpersona (params) {
  return request({
    url: '/personalized',
    method: 'get',
    params
  })
}
// 获取网页精选
export function getPtense (params) {
  return request({
    url: '/top/playlist/',
    method: 'get',
    params
  })
}
// 分类2
/**
 * 获取推荐最高列表数据
 * import { getToplist } from '@/api'
 */
export function getkindlist (params) {
  // const data = params || { limit: 9, count: 0 }
  return request({
    url: '/top/playlist/highquality',
    method: 'get',
    params
  })
}
// 分类1
export function getToplist (params) {
  // const data = params || { limit: 9, count: 0 }
  return request({
    url: '/top/playlist',
    method: 'get',
    params
  })
}
// 歌单详情
export function getDetail (params) {
  return request({
    url: '/playlist/detail',
    method: 'get',
    params
  })
}
export function getSingerDetail (params) {
  return request({
    url: '/artist/top/song',
    method: 'get',
    params
  })
}
// 歌曲详情
export function getSonges (params) {
  return request({
    url: '/song/detail',
    method: 'get',
    params
  })
}
/**
 * 搜索/search
 */
export function getSearch (params) {
  return request({
    url: '/search',
    method: 'get',
    params
  })
}
// 热门搜索/search/hot
export function getHot () {
  return request({
    url: '/search/hot/detail',
    method: 'get'
  })
}
// 获取歌词
export function getLyric (params) {
  return request({
    url: '/lyric',
    method: 'get',
    params
  })
}
// 推荐MV
export function exclusive (params) {
  return request({
    url: '/mv/first',
    method: 'get',
    params
  })
}
// 获取验证码
export function captchaSent (params) {
  return request({
    url: '/captcha/sent',
    method: 'get',
    params
  })
}
// 热门歌手
export function artistsTop (params) {
  return request({
    url: '/top/artists',
    method: 'get',
    params
  })
}
// 获取歌手单曲
export function arTists (params) {
  return request({
    url: '/artists',
    method: 'get',
    params
  })
}
// 获取相似mv 必选参数 : mvid: mv id
export function urlMv (params) {
  return request({
    url: '/simi/mv',
    method: 'get',
    params
  })
}
// 获取 mv 数据 必选参数 : mvid: mv 的 id
export function Mvdetail (params) {
  return request({
    url: '/mv/detail',
    method: 'get',
    params
  })
}
// 推荐电台
export function dianTaoi (params) {
  return request({
    url: '/personalized/djprogram',
    method: 'get',
    params
  })
}
/**
 * 用户注册区
*/

// 发送验证码
export function caPtcha (params) {
  return request({
    url: '/captcha/sent',
    method: 'post',
    params
  })
}
// 验证短信验证码是否正确/captcha/verify必选参数 : phone: 手机号码 captcha: 验证码
export function CapTchas (params) {
  return request({
    url: '/captcha/verify',
    method: 'post',
    params
  })
}
// 检测手机是否已注册/cellphone/existence/check
export function exisTence (params) {
  return request({
    url: '/cellphone/existence/check',
    method: 'post',
    params
  })
}
/**
 * 进入注册 /register/cellphone
 * 必选参数 :captcha: 验证码phone : 手机号码password: 密码nickname: 昵称
 */
export function WyRegister (params) {
  return request({
    url: '/register/cellphone',
    method: 'post',
    params
  })
}
/**
 * 登陆接口 /login/cellphone
 * 必选参数手机号码
 * 密码
 * 附加参数手机验证码
 */
export function getLogin (params) {
  return request({
    url: '/login/cellphone',
    method: 'post',
    params
  })
}
/**
 * 获取每日推荐歌单
 * 说明 : 调用此接口 , 可获得每日推荐歌单 ( 需要登录 )
 * /recommend/resource
 */
export function getSource (params) {
  return request({
    url: '/recommend/resource',
    method: 'get',
    params
  })
}
